﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Functions
{
    class Program
    {
        static void Main(string[] args)
        {
            int a;

            if (int.TryParse("a", out a))
            {
                Console.WriteLine(a);
            }
            else
            {
                Console.WriteLine("Parse Error!");
            }

            int x = new int();

            x = TestFunction(x);

            object obj1 = null;
            object obj2;

            RefFunc(ref obj1);
            OutFunc(out obj2);

            double A;
            double C = CircleCalc(1.25, out A);
        }

        static double CircleCalc(double R, out double A)
        {
            A = Math.PI * R * R;
            return 2 * Math.PI * R;
        }

        static void OutFunc(out object x)
        {
            x = null;
        }

        static void RefFunc(ref object x)
        {

        }

        private static int TestFunction(int x)
        {
            x *= 5;
            Console.WriteLine(x);
            return x;
        }

        private static ToMIC GetMIC()
        {
            return new ToMIC
            {
                Address = "SEUA 10 building",
                FoundingDate = new DateTime(2011, 1, 1)
            };
        }
    }

    class ToMIC
    {
        public string Address { get; set; }
        public DateTime FoundingDate { get; set; }
    }
}
